﻿using System.Web;
using System.Web.WebPages.Html;
using FluentValidation;
using SDF.Core;
using SDFAuth.Models;

namespace Nop.Web.Validators.Boards
{
    public class CityModelValidator : AbstractValidator<CityModel>
    {

        public CityModelValidator()
        {
            ////To set the cascade mode globally, you can set the CascadeMode property on the static ValidatorOptions class during your application's startup routine:
            ////ValidatorOptions.CascadeMode = CascadeMode.StopOnFirstFailure;

            //this.CascadeMode = CascadeMode.StopOnFirstFailure;

            //RuleFor(u => u.UserName)
            //                        .NotEmpty().WithMessage("用户名不能为空")
            //                        .Length(2, 30).WithMessage("长度错误")
            //                        .LessThanOrEqualTo("201201231");

            //RuleFor(u => u.Password)
            //                       .NotEmpty().WithMessage("密码不能为空");

            //RuleFor(u => u.ValidateCode).Must(CheckValidateCode).WithMessage("验证码错误");
            
        }
      
    }
}